package org.example.dao;

import org.apache.ibatis.annotations.Param;
import org.example.entity.ProductEntity;
import org.springframework.stereotype.Repository;

import java.io.IOException;
import java.util.List;

/**
 * @author HanJiafeng
 */
@Repository
public interface IProductDao {
    /**
     * 根据商品id查询一件商品
     *
     * @param id id
     * @return 记录
     * @throws IOException IOException
     */
    ProductEntity selectById(Integer id) throws IOException;

    /**
     * 查询
     *
     * @param record record
     * @param limit  limit
     * @param offset offset
     * @return list
     * @throws IOException 异常
     */
    List<ProductEntity> selectSelective(@Param("record") ProductEntity record, @Param("limit") Integer limit, @Param("offset") Integer offset) throws IOException;
}
